home *** CD-ROM | disk | FTP | other *** search
/ Aminet 8 / Aminet 8 (1995)(GTI - Schatztruhe)[!][Oct 1995].iso / Aminet / dev / gcc / gcc270_src.lha / gcc-2.7.0-amiga / config / a29k / a29k-udi.h next >
C/C++ Source or Header  |  1995-06-15  |  3KB  |  105 lines

  1. /* Definitions of target machine for GNU compiler, for AMD Am29000 CPU
  2.    running over UDI using COFF.
  3.    Copyright (C) 1994 Free Software Foundation, Inc.
  4.  
  5. This file is part of GNU CC.
  6.  
  7. GNU CC is free software; you can redistribute it and/or modify
  8. it under the terms of the GNU General Public License as published by
  9. the Free Software Foundation; either version 2, or (at your option)
  10. any later version.
  11.  
  12. GNU CC is distributed in the hope that it will be useful,
  13. but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. GNU General Public License for more details.
  16.  
  17. You should have received a copy of the GNU General Public License
  18. along with GNU CC; see the file COPYING.  If not, write to
  19. the Free Software Foundation, 59 Temple Place - Suite 330,
  20. Boston, MA 02111-1307, USA.  */
  21.  
  22. #include "a29k/a29k.h"
  23.  
  24. /* Output DBX (stabs) debugging information if doing -gstabs.  */
  25.  
  26. #define DBX_DEBUGGING_INFO
  27.  
  28. /* Generate SDB debugging information by default. */
  29.  
  30. #define PREFERRED_DEBUGGING_TYPE SDB_DEBUG
  31.  
  32. /* Support the ctors and dtors sections for g++.  */
  33.  
  34. #define CTORS_SECTION_ASM_OP    "\t.use .ctors"
  35. #define DTORS_SECTION_ASM_OP    "\t.use .dtors"
  36.  
  37. /* A list of other sections which the compiler might be "in" at any
  38.    given time.  */
  39.  
  40. #undef EXTRA_SECTIONS
  41. #define EXTRA_SECTIONS readonly_data, in_ctors, in_dtors
  42.  
  43. /* A list of extra section function definitions.  */
  44.  
  45. #undef EXTRA_SECTION_FUNCTIONS
  46. #define EXTRA_SECTION_FUNCTIONS                        \
  47.   READONLY_DATA_FUNCTION                        \
  48.   CTORS_SECTION_FUNCTION                        \
  49.   DTORS_SECTION_FUNCTION
  50.  
  51. #define READONLY_DATA_FUNCTION                    \
  52. void                                \
  53. literal_section ()                        \
  54. {                                \
  55.   if (in_section != readonly_data)                \
  56.     {                                \
  57.       fprintf (asm_out_file, "%s\n", READONLY_DATA_SECTION_ASM_OP); \
  58.       in_section = readonly_data;                \
  59.     }                                \
  60. }                                \
  61.  
  62. #define CTORS_SECTION_FUNCTION                        \
  63. void                                    \
  64. ctors_section ()                            \
  65. {                                    \
  66.   if (in_section != in_ctors)                        \
  67.     {                                    \
  68.       fprintf (asm_out_file, "%s\n", CTORS_SECTION_ASM_OP);        \
  69.       in_section = in_ctors;                        \
  70.     }                                    \
  71. }
  72.  
  73. #define DTORS_SECTION_FUNCTION                        \
  74. void                                    \
  75. dtors_section ()                            \
  76. {                                    \
  77.   if (in_section != in_dtors)                        \
  78.     {                                    \
  79.       fprintf (asm_out_file, "%s\n", DTORS_SECTION_ASM_OP);        \
  80.       in_section = in_dtors;                        \
  81.     }                                    \
  82. }
  83.  
  84. #define INT_ASM_OP ".word"
  85.  
  86. /* A C statement (sans semicolon) to output an element in the table of
  87.    global constructors.  */
  88. #define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME)                \
  89.   do {                                    \
  90.     ctors_section ();                            \
  91.     fprintf (FILE, "\t%s\t ", INT_ASM_OP);                \
  92.     assemble_name (FILE, NAME);                        \
  93.     fprintf (FILE, "\n");                        \
  94.   } while (0)
  95.  
  96. /* A C statement (sans semicolon) to output an element in the table of
  97.    global destructors.  */
  98. #define ASM_OUTPUT_DESTRUCTOR(FILE,NAME)                       \
  99.   do {                                    \
  100.     dtors_section ();                                   \
  101.     fprintf (FILE, "\t%s\t ", INT_ASM_OP);                \
  102.     assemble_name (FILE, NAME);                              \
  103.     fprintf (FILE, "\n");                        \
  104.   } while (0)
  105.